package routers

import (
	"autoclave/controller/api"
	"autoclave/middleware"
	"github.com/gin-gonic/gin"
)

func BmsRouterInit(r *gin.Engine) {
	bmsRouters := r.Group("/api")
	// 设置中间件 - 验证签名
	bmsRouters.Use(middleware.CheckLogin)
	{
		bmsRouters.GET("/test", api.DemoController{}.Test)
		bmsRouters.POST("/getRealTimeState", api.HomeController{}.GetRealTimeState)
		bmsRouters.POST("/getRuntimeData", api.HomeController{}.GetRuntimeData)
		bmsRouters.POST("/getLogList", api.HomeController{}.GetLogList)
		bmsRouters.GET("/receiveDataStart", api.TaskController{}.ReceiveDataStart)
		bmsRouters.GET("/receiveDataStop", api.TaskController{}.ReceiveDataStop)
	}
}
